#ifndef __MVECTOR_2D_HPP__
#define __MVECTOR_2D_HPP__

#include <math.h>

template <class T>
class MVector2D
{
public:
	MVector2D(const MVector2D<T>& vecRef);
	MVector2D(const T& inX, const T& inY);

	~MVector2D();

	void set(const T& inX, const T& inY);

	T  getLength();

	T x, y;
};

template <class T>
MVector2D<T>::MVector2D(const MVector2D<T> &vecRef)
{
	x = vecRef.x;
	y = vecRef.y;
}

template <class T>
MVector2D<T>::MVector2D(const T &inX, const T &inY)
{
	x = inX;
	y = inY;
}

template <class T>
void MVector2D<T>::set(const T &inX, const T &inY)
{
	x = inX;
	y = inY;
}

template <class T>
T MVector2D<T>::getLength()
{
	return sqrt( x*x + y*y);
}

#endif //__MVECTOR_2D_HPP__

//EOF
